package com.note.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/6/6 14:31
 * @since JDK 1.8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("内容新增")
public class ContentVo {

    @ApiModelProperty("主键id")
    private Integer id;

    @ApiModelProperty("标题")
    @Length(min = 2,max = 25) //最小长度为2个字，最大长度为25个字
    private String title;

    @ApiModelProperty("标签")
    @Length(min = 2,max = 25) //最小长度为2个字，最大长度为25个字
    private String tag;

    @ApiModelProperty("内容")
    @Length(min = 10) //最小长度为10个字
    private String content;
}
